package importadodebookworm;



import java.util.LinkedList;

public class Review 
{
	private int reviewId;
	private String isbn;
	private String bookTitle;
	private LinkedList<String> authors;
	private String reviewer;
	private String reviewTitle;
	private String publisher;
	private String reviewDate;
	private int rating;
	private String urlReview;
	private String smallCover;
	private String mediumCover;
	private LinkedList<String> linksWhereToBuyBook;
	private String reviewText;
	private LinkedList<String> tags;
	
	private String notaResenhaParaAllAboutMyBook;
	
	public Review()
	{
		this.tags = new LinkedList<String>();
		this.authors = new LinkedList<String>();
	}
	public int getReviewId() {
		return reviewId;
	}
	public void setReviewId(int id) {
		this.reviewId = id;
	}
	public String getIsbn() {
		return isbn;
	}
	public void setIsbn(String isbn) {
		this.isbn = isbn;
	}
	public LinkedList<String> getAuthors() {
		return authors;
	}
	public void setAuthors(LinkedList<String> authors) {
		this.authors = authors;
	}
	public String getReviewer() {
		return reviewer;
	}
	public void setReviewer(String reviewer) {
		this.reviewer = reviewer;
	}
	public String getPublisher() {
		return publisher;
	}
	public void setPublisher(String publisher) {
		this.publisher = publisher;
	}
	public String getReviewDate() {
		return reviewDate;
	}
	public void setReviewDate(String reviewDate) {
		this.reviewDate = reviewDate;
	}
	public int getRating() {
		return rating;
	}
	public void setRating(int rating) 
	{
		this.rating = rating;
		if(rating == 0)
		{
			this.notaResenhaParaAllAboutMyBook = "pessimo";
		}
		else if(rating == 1)
		{
			this.notaResenhaParaAllAboutMyBook = "pessimo";
		}
		else if(rating == 2)
		{
			this.notaResenhaParaAllAboutMyBook = "ruim";
		}
		else if(rating == 3)
		{
			this.notaResenhaParaAllAboutMyBook = "bom";
		}
		else if(rating == 4)
		{
			this.notaResenhaParaAllAboutMyBook = "muito bom";
		}
		else if(rating == 5)
		{
			this.notaResenhaParaAllAboutMyBook = "excelente";
		}
		else
		{
			this.notaResenhaParaAllAboutMyBook = "excelente";
		}
	}
	public String getUrlReview() {
		return urlReview;
	}
	public void setUrlReview(String urlReview) {
		this.urlReview = urlReview;
	}
	public String getSmallCover() {
		return smallCover;
	}
	public void setSmallCover(String smallCover) {
		this.smallCover = smallCover;
	}
	public String getMediumCover() {
		return mediumCover;
	}
	public void setMediumCover(String mediumCover) {
		this.mediumCover = mediumCover;
	}
	public LinkedList<String> getLinksWhereToBuyBook() {
		return linksWhereToBuyBook;
	}
	public void setLinksWhereToBuyBook(LinkedList<String> linksWhereToBuyBook) {
		this.linksWhereToBuyBook = linksWhereToBuyBook;
	}
	public String getReviewText() {
		return reviewText;
	}
	public void setReviewText(String reviewText) {
		this.reviewText = reviewText;
	}
	public String getBookTitle() {
		return bookTitle;
	}
	public void setBookTitle(String bookTitle) {
		this.bookTitle = bookTitle;
	}
	public String getReviewTitle() {
		return reviewTitle;
	}
	public void setReviewTitle(String reviewTitle) {
		this.reviewTitle = reviewTitle;
	}
	public LinkedList<String> getTags() {
		return tags;
	}
	public void setTags(LinkedList<String> tags) {
		this.tags = tags;
	}
	
	public boolean doesReviewHaveThisAuthor(String authorName)
	{
		for(int i = 0; i < this.authors.size(); i++)
		{
			String oneAuthor = authors.get(i);
			if(oneAuthor.compareTo(authorName) == 0)
			{
				return true;
			}
		}
		return false;
	}
	
	public boolean doesReviewHaveThisTag(String tagName)
	{
		for(int i = 0; i < this.tags.size(); i++)
		{
			String oneTag = tags.get(i);
			if(oneTag.compareTo(tagName) == 0)
			{
				return true;
			}
		}
		return false;
	}
	
	public void addNewTag(String tag)
	{
		this.tags.add(tag);
	}
	
	public void addNewAuthor(String author)
	{
		this.authors.add(author);
	}
	public String getNotaResenhaParaAllAboutMyBook() {
		return notaResenhaParaAllAboutMyBook;
	}
	public void setNotaResenhaParaAllAboutMyBook(
			String notaResenhaParaAllAboutMyBook) {
		this.notaResenhaParaAllAboutMyBook = notaResenhaParaAllAboutMyBook;
	}
	
	
	
	

}
